﻿using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Flynn.Core;
using FlynnGui.ViewModels;
using FlynnGui.Views;

namespace FlynnGui
{
	/// <summary>
	/// Interaction logic for Window1.xaml
	/// </summary>
	public partial class MainWindow : Window
	{
		public MainWindow()
		{
			InitializeComponent();
		}

		private void _mainWindow_Loaded(object sender, RoutedEventArgs e)
		{
			ProjectView projectView = new ProjectView();

			_contentGrid.Children.Add(projectView);

			ProjectLoader projectLoader = new ProjectLoader();
			Project project = projectLoader.LoadProject("FlynnDemo.xml");

			ProjectViewModel projectViewModel = new ProjectViewModel(project);
			projectView.DataContext = projectViewModel;
		}
	}
}